<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>


     <script>
  
            var k = window.prompt();
            var  u=k;
            for(var i=1;i<=k;i++)
            {
                 for(var o = 1;o<=u-1;o++)
                 {
                     if(o>k-1)
                     {
                         break;
                     }
                 document.write("&nbsp;")
                   }
                for(var p=1;p<=2*i-1;p++)
                {
                    document.write("*")
                }
                document.write("<br/>")
                u--;
            }    
  var y =k;
  var e =1; 
            for(var z=k-1;z>0;z--)
            {
                for(var x = 1;x<=e;x++)
                {
                    document.write("&nbsp;")
                }
                for(var c=z*2-1;c>0;c--)
                {
                   document.write("*")
                } 
                document.write("<br/>")
                y--;
                e++;
            }
     </script>
        

</body>
</html>